/**
 * Anderground project - Subway maps processor application.
 * Copyright (C) 2008 Maksim Tkatchenko
 * Copyright (C) 2008-2009 Eldar Abusalimov, Ilya Shurigyn
 * 
 * This file is part of Anderground.
 * 
 * Anderground is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * Anderground is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Anderground.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.anderground.core.graphics;

public class Color {

	public static final int BLACK = 0xff000000;
	public static final int BLUE = 0xff0000ff;
	public static final int CYAN = 0xff00ffff;
	public static final int DKGRAY = 0xff444444;
	public static final int GRAY = 0xff888888;
	public static final int GREEN = 0xff00ff00;
	public static final int LTGRAY = 0xffcccccc;
	public static final int MAGENTA = 0xffff00ff;
	public static final int RED = 0xffff0000;
	public static final int TRANSPARENT = 0x00000000;
	public static final int WHITE = 0xffffffff;
	public static final int YELLOW = 0xffffff00;

	public static int argb(int alpha, int red, int green, int blue) {
		return (alpha << 24) | (red << 16) | (green << 8) | blue;
	}

	public static int rgb(int red, int green, int blue) {
		return argb(255, red, green, blue);
	}

	public static int red(int color) {
		return (color >> 16) & 0xFF;
	}

	public static int green(int color) {
		return (color >> 8) & 0xFF;
	}

	public static int blue(int color) {
		return color & 0xFF;
	}

	public static int alpha(int color) {
		return color >>> 24;

	}

}
